package com.mgm.dao;

import com.mgm.pojo.ConversionInfo;
import com.mgm.pojo.ConversionInfoExample;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface ConversionInfoMapper {
    long countByExample(ConversionInfoExample example);

    int deleteByPrimaryKey(Long id);

    int insert(ConversionInfo record);

    int insertSelective(ConversionInfo record);

    List<ConversionInfo> selectByExample(ConversionInfoExample example);

    ConversionInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ConversionInfo record);

    int updateByPrimaryKey(ConversionInfo record);
    
    //获取总cap
    BigDecimal selectTotalCap(@Param("offerid")String offerid);
    //获取日cap
    BigDecimal selectDailyCap(@Param("offerid")String offerid);
    //获取 Offer-渠道 总cap
	BigDecimal selectTotalCapByAffId(@Param("offerid")String offerid, @Param("affid")String affid);
	//获取 Offer-渠道 日cap
	BigDecimal selectDailyCapByAffId(@Param("offerid")String offerid, @Param("affid")String affid);
}